home *** CD-ROM | disk | FTP | other *** search
/ ASME's Mechanical Engine…ing Toolkit 1997 December / ASME's Mechanical Engineering Toolkit 1997 December.iso / dynamics / aero141a.txt < prev    next >
Text File  |  1994-05-07  |  21KB  |  529 lines

  1. FORMAT OF WORLD & SEQUENCE FILES
  2. --------------------------------
  3. AERO data files are user-readable ASCII files. Comments start with a 
  4. hash mark ("#") and extend to the end of the line. Lower case characters 
  5. denote an optional value and need not be specified - in this case the 
  6. default values (often 0) are used.
  7.  
  8. STATE FORMAT
  9.  
  10. Z                             # begin of a new state
  11. t <starttime:real>
  12. g <gravity:vector>
  13. s <seed value for random value generation:integer>
  14.  
  15. # any number of bodies
  16. K<bodynr:+integer> <bodytype> <body geometry> <material>
  17. m <mass:real>                 # mass in kg
  18. p <position:vector>           # position of the center of gravity in meter
  19. v <velocity:vector>           # in meter per second
  20. a <acceleration:vector>       # [m/s^2]
  21. q <quaternion>                #
  22. w <vektor>                    # rotary velocity [rad/s]
  23. u <vektor>                    # rotary acceleration [rad/s^2]
  24. c <red:ushort> <green:0-65535> <blue:ushort>                 # color 
  25. n <transparency:real> <reflexion:real> <roughness:real>      # for ray tracer
  26. b -[g][m][k]                  # type of movement: no gravity, 
  27.                               #      no mass, no collision check
  28. i <idnr:long>                 # identification nummber
  29.  
  30.  
  31. For a "composed" body, the corresponding embedded bodies with their 
  32. parameters should be following the body definition.
  33. The position of the composed object is computed as the center of gravity of
  34. the embedded bodies!
  35.  
  36. E <bodytype> <geometry> <material>  # only cuboid, sphere and cylinder are allowed
  37. m <mass:real>                       # mass [kg]
  38. p <position:vektor>                 # position [m]
  39. q <quaternion>                      # quaternion ref. Inertialsystem
  40. c <red:ushort> <green:ushort> <blue:ushort>   # color
  41. X                                   # end marker of a composed object
  42.  
  43.  
  44. Links are entered as follows:
  45.  
  46. V<linknr> K<nr1> K<nr2> <linktype> <linkparameters>  # any number of links
  47. a <linkpoint1:vektor>       # position of connection at body <nr1>
  48. b <linkpoint2:vektor>       # and at body <nr2>
  49.  
  50.  
  51. A constant force of <strength> is applied at a point of a body during the 
  52. time intervall t0 and t1. 
  53.  
  54. F <t0:real> <t1:real> K<bodynr> [<point:vektor>] <forceparameter>
  55.  
  56. Q                           # denotes the end of the current state
  57.  
  58.  
  59. For all definitions above, the following types apply:
  60.  
  61.  long   = 0..2^31
  62.  ushort = 0..65535
  63.  vector = <real> <real> <real>
  64.  quaternion = <real> <real> <real> <real>
  65.  bodytype = sphere | box | cylinder | plane | nail | mpoint | point | composed
  66.  bodygeometry of "sphere"  = <radius:real>
  67.  bodygeometry of "cylinder" = <radius:real> <height:real>
  68.  bodygeometry of "box" = <xyz-dimensions:vector>
  69.  
  70.  <material> = material name from the material table e.g.: iron, plastic, ..
  71.    # this is only set for sphere, box, cylinder und plane !
  72.  
  73.  <linktype> = spring | damper | joint | rod
  74.  linkparameter for "spring" = <resting length:real> <spring constant:real>
  75.  linkparameter for "damper" = <damping constant:real>
  76.  linkparameter for "rod" = <length:real>
  77.  
  78.  <forceparameter> = inertial <force:vektor>  # const. force in inertial system [N]
  79.  <forceparameter> = local <force':vektor>    # force ref to body coord. system
  80.  <forceparameter> = guided <force:real> K<targetbody> [<target position:vektor>] 
  81.              # constant force in [N] directed always to a point at the target body
  82.  
  83.  
  84. The following samples show erroneous entries, which will be checked
  85. when read by AERO:
  86.  * Z
  87.  * g 0 -9.81 0                       # negative gravity
  88.  *
  89.  * K1 box 0.1 0.2 0.3 iron           # iron cuboid falls down to nowhere
  90.  * v -1.0 0 0
  91.  *
  92.  * K2 sphere 0.05 plastic            # plastic sphere as pendulum
  93.  * p -2.0 10.0 0
  94.  *
  95.  * K3 nail
  96.  * p 0.0 10.0 0.0
  97.  *
  98.  * V1 K2 K3 rod 2.0
  99.  *
  100.  * F1 K1 0 1 0 0 0 inertial 10 0 0   # force in the center of K1 in x-diection with
  101.  *                                   # strength 10N is applied during time 0s <= t <= 1s
  102.  * Q
  103.  
  104.  
  105. MATERIAL FORMAT:
  106.  
  107. # this is an remark
  108. M <maximum number of materials:Integer>
  109. m <name:string> <density:real> <dynamic friction constant:real> 
  110.   <static friction constant:real> 
  111.   <impact value:real> <spring value:real> <damping value:real>
  112.   [<default_red:ushort> <default_green:ushort> <default_blue:ushort> 
  113.    <transparency:real> <reflexion:real> <roughness:real>]
  114. # density in [kg/m^3]
  115. # transparency in the interval 0..1
  116. Q
  117.  
  118.  
  119.  
  120. CONFIGURATION FORMAT
  121.  
  122. P
  123. h <integration step width:real> <min> <max>
  124. e (Y|N) <eps:real>                  # error control Y(es) or N(o)
  125. k (Y|N) <collision step width:real> # collision activated Y(es) or N(o)
  126. b <max. resting speed:real> <min. penetration depth:real>
  127. u <min. sliding speed:real> <min. rolling speed:real>
  128. g (Y|N) <random gravity in %:real>
  129. r <rod spring constant:real> <rod damping constant:real>   
  130. j <joint spring constant:real> <joint damper constant:real>
  131. m <minimal srping stretching:real>
  132. q <maximal cuboid-collision diagonal depth:real>
  133. s (Y|N)                             # spring impact YES, NO
  134. a (Y|N) <cw-value of sphere:real> <cw-value of cuboid:real> <cw-value of cylinder:real>
  135. Q
  136.  
  137.  
  138. The AERO internal format is now described by using an example.
  139. Sample world (state) file:
  140.  
  141. W              # start world file
  142. M 32           # material table, may contain 32 entries
  143.                # two materials, "iron" and "wood" are entered
  144. m iron 7.8000e+03 1.0000e+00 1.3000e+00 9.0000e-01 5.0000e+04 5.0000e+02
  145. m wood 6.0000e+02 5.0000e-01 6.5000e-01 7.0000e-01 5.0000e+04 5.0000e+02
  146. Q              # end of material table
  147.  
  148.  
  149. Z              # start description of current state: objects, forces, and links
  150. t 1            # time of state description
  151. g 0 -9.81 0    # gravitation vector
  152.  
  153.                # object definitions start with letter "K" plus a number
  154.                # "K1" is the first object: sphere, radius 5cm, material iron
  155. K1 sphere 5.00000000e-02 iron
  156.                # mass
  157. m 4.08398627e+00 
  158.                # position
  159. p -2.14595881e-01 8.11705112e-02 0.00000000e+00
  160.                # orientation
  161. q 6.61532809e-01 0.00000000e+00 0.00000000e+00 -7.49916216e-01
  162.                # velocity
  163. v -1.54115612e-03 1.68088549e-03 0.00000000e+00
  164.                # rotary velocity
  165. w 0.00000000e+00 0.00000000e+00 1.72884763e-02
  166.  
  167.  
  168. K2 nail        # object labelled "K2": immmovable point (nail)
  169. p 0.00000000e+00 4.00000000e-01 0.00000000e+00
  170.  
  171.  
  172.                # link definitions start with letter "V" plus a number
  173.                # "V1" links objects K1 and K2 with a rod of specified length
  174. V1 K1 K2 rod 3.26810113e-01
  175.                # the following line(s) denotes the link's fixture point for
  176.                # the first and/or second object (marked "a" or "b"), in case
  177.                # it is not identical to an object's center.
  178. a 3.75000000e-02 -4.00000000e-02 0.00000000e+00
  179.  
  180.  
  181. V2 K1 K2 rod 4.12310563e-01
  182.                # the second link "V2" is again between object K1 and K2
  183. a 3.00000000e-02 4.00000000e-02 0.00000000e+00
  184. b -5.50000000e-01 -3.12250226e-17 0.00000000e+00
  185.  
  186.  
  187.                # force definitions start with letter "F"
  188.                # next params: start and termination time for applying force
  189.                # next params: object (here "K1"), force type (guided, 
  190.                #  inertial, or local), force attack vector (includes strength)
  191. F 1 1.01 K1 inertial 0 0 4
  192.  
  193. Q              # end description of current state
  194.                # end of world file
  195.  
  196.  
  197. Sequence files are similar to world files, however, they may conatain several
  198. "world" states. For these, a mark "X" has to be placed before the first state,
  199. and a mark "Y" has to be placed after the last state.
  200.  
  201. NOTICE
  202.  
  203. The AERO software package is licensed free of charge. Therefore, we 
  204. provide absolutely no warranty of any kind in any case. The Universitaet 
  205. Stuttgart and the authors provide the AERO software package "as is" 
  206. without warranty of any kind, either expressed or implied, including, but not 
  207. limited to, the implied warranties of merchantability and fitness for a 
  208. particular purpose. The entire risk as to the quality and the performance of 
  209. the program is with you. Should the AERO software package prove defective,
  210. you assume the cost of all necessary servicing, repair or correction.
  211.  
  212. In no event may the Universitaet Stuttgart or any of the programs' authors be 
  213. liable to you for damages, including any lost profits, lost monies, or other 
  214. special, incidental or consequential damages arising out of the use or inability
  215. to use (including but not limited to loss of data or data being rendered 
  216. inaccurate or losses sustained by third parties or a failure of the program to 
  217. operate with programs not included in the AERO software package) the 
  218. program, even if you have been advised of the possibility of such damages, or 
  219. for any claim by any other party.
  220.  
  221.  
  222. COPYRIGHT AND PUBLIC DOMAIN LICENCE
  223.  
  224. The AERO software package is being distributed by the Universitaet 
  225. Stuttgart as public domain software. Copyright (c) is with the authors, Hartmut
  226. Keller, Horst Stolz, Andreas Ziegler and Thomas Braunl at the Univ. Stuttgart,
  227. IPVR, Germany. 
  228. There is no warranty in any case as stated in the paragraph above.
  229.  
  230. You are free to use and copy the original AERO software package free of 
  231. charge for non-commercial applications, provided that 
  232. the notices on copyright, public domain, and no warranty of this page
  233. as well as a reference to the Computer Science report on AERO
  234. by the authors are included,
  235.  
  236. You may obtain the AERO software package for any of the following computer
  237. systems:
  238.     *  SUN 4 / Sparcstation
  239.     *  IBM RS/6000         
  240.     *  IBM PC (linux) or compatibles 
  241.  
  242.  
  243. DOCUMENTATION
  244.  
  245. Keller, Stolz, Ziegler, Braunl: Adventures in Virtual Mechanics  -  Simulation
  246. and Animation of Rigid-Body-Systems, Computer Science Report, no. 8/93,
  247. Univ. Stuttgart, Germany, July 1993
  248.  
  249.  
  250. HOW TO COPY FILES VIA "ANONYMOUS FTP"
  251.  
  252. enter: ftp ftp.informatik.uni-stuttgart.de
  253.  
  254. > Connected to inf.
  255. > 220 inf FTP server (Version 6.36 SVR4 Thu Mar 18 10:49:05 MET 1993) ready.
  256. > Name (ftp:...:):
  257. enter: ftp
  258.  
  259. > 331 Guest login ok, send e-mail address as password.
  260. > Password:
  261. enter: <your email address>
  262.  
  263. > ...
  264. > ftp>
  265. enter: cd pub/AERO
  266.  
  267. > 250 CWD command successful.
  268. > ftp>
  269. enter: get README
  270. (for ASCII text files)
  271.  
  272. > ...
  273. enter: bin
  274. enter: get aero.sun4.tar.gz
  275. (for binary files)
  276.  
  277. > ...
  278. enter: bye
  279. (to exit)
  280. > 221 Goodbye
  281.  
  282. -------------------------------
  283.  
  284. After copying binary files you have to "un-zip" and "de-tar" them.
  285. These filenames look like:  xyz.tar.gz
  286. Type:  gzcat xyz.tar.gz | tar xvf -
  287.  
  288. -------------------------------
  289.  
  290. ========================================================================
  291. Univ. Stuttgart IPVR, Breitwiesenstr. 20-22, D-70565 Stuttgart,  Germany
  292. ========================================================================
  293.  
  294. -------------------------
  295.          AERO               "ADVENTURES IN VIRTUAL MECHANICS"
  296. -------------------------
  297.  
  298. AERO is an X-window based tool for simulation and visualization of
  299. rigid-body systems. AERO contains a 3D scene editor for designing
  300. simple blocks world scenes. Objects may be placed in space, linked
  301. to each other, and forces may be exerted onto them.
  302.  
  303. In animation mode, the simulation of the scene entered is carried
  304. out in real time (depending on scene complexity) displaying 3D
  305. wire frames. Also, a flag can be set to generate scene description files
  306. for each time point as input files for a ray tracing program, producing
  307. photorealistic output.
  308.  
  309. In both modes, wire frame and ray tracing scenes, the generation of
  310. stereo images is possible. In the case of real time wire frames
  311. a red-green representation of the scene is rendered, which can be viewed
  312. with red-green glasses. For the ray tracing output, a binocular pair
  313. of scene descriptions is generated for each time step.
  314.  
  315. AERO can be used for exploring the physical laws of mechanics and
  316. also for generating realistic computer animations. AERO is available
  317. free of charge as public domain software. Software and documentation
  318. can be copied via "anonymous ftp" over the Internet.
  319. The address of our server is:
  320.   ftp.informatik.uni-stuttgart.de  (currently 129.69.211.2)
  321. The directory is:
  322.   pub/AERO
  323.  
  324. ------------------------------------
  325. For installing the binaries:
  326.    copy the appropriate binary file,
  327.    decompress and de-tar it:
  328.      e.g. gzcat aero.sun4.tar.gz | tar xf -
  329.  
  330.    copy the file "xaero" into your local "bin" directory, then
  331.    copy the file "XAero" (note the capital letters) in your local
  332.    "app-defaults" directory and set the environment variable appropriately:
  333.      e.g. setenv XAPPLRESDIR ~your_name/your_app-defaults/
  334.    then start AERO:
  335.      e.g. xaero
  336.  
  337. Trouble shooting;
  338.    In case you encounter the erroor message after starting AERO:
  339.      "Error: Widget EM_Darstellung3D has zero width and/or height"
  340.    then there is a problem with your installing the "app-defaults-file"
  341.    (AERO cannot find it). Re-try the installation instructions above.A
  342.  
  343. ------------------------------------
  344. For scene rendering you need:
  345.     POVray public domain ray tracing software
  346.       from alfred.ccs.carleton.ca (134.117.1.1)
  347.       in   pub/pov-ray/POV-Ray1.0
  348.     (for the current AERO version, you have to use POVray1.0
  349.      or POVray2.0 with command line option "+MV1.0")
  350.  
  351. ------------------------------------
  352. For viewing the animations you need:
  353.     MPEG-decoding software
  354.       from toe.cs.berkeley.edu   (128.32.149.117)
  355.       in   pub/multimedia/mpeg
  356.  
  357. ------------------------------------
  358. For compiling the sources you need:
  359.      X11-libraries (best: Release 5 or newer)
  360.      Athena-Widget-Set
  361.      FWF-Widget-Set from a.cs.uiuc.edu (128.174.252.1) 
  362.                     in   pub/fwf.shar.Z
  363.                  or from ftp.informatik.tu-muenchen.de (131.159.0.110)
  364.                     in   /pub/comp/X11/contrib/lib/fwf/fwf.tar.Z
  365.      gcc (Version at least 2.3.3)
  366.      ld or gld
  367. ------------------------------------
  368.  
  369.  
  370. Academic reference:
  371.   Keller, Stolz, Ziegler, Braunl: Virtual Mechanics -- Simulation 
  372.   and Animation of Rigid Body Systems, Report of the Computer 
  373.   Science Department, Univ. Stuttgart, no. 8/93, August 1993
  374.  
  375. Hartmut Keller  keller@hermes.informatik.uni-stuttgart.de
  376. Horst Stolz     stolz@hermes.informatik.uni-stuttgart.de
  377. Andreas Ziegler aziegler@hermes.informatik.uni-stuttgart.de
  378. Thomas Braunl   braunl@informatik.uni-stuttgart.de
  379.  
  380. ========================================================================
  381. Univ. Stuttgart IPVR, Breitwiesenstr. 20-22, D-70565 Stuttgart,  Germany
  382. ========================================================================
  383.  
  384. AERO User Guide
  385. ===============
  386.  
  387. AERO is startet with the command
  388.   xaero
  389.  
  390. (be sure to have the file "xaero" installed in your local "bin"
  391.  directory and the file "XAero" in your local "app-defaults" directory.
  392.  In case of problems: place both files in your home directory and start
  393.  from there)
  394.  
  395. You may start the program with command line parameters to compute a sequence
  396. off-line (in batch mode). 
  397.  
  398. Command line parameters are :
  399.  
  400.  -b         run program in batch mode
  401.  -f  name   specify input file of sequence or world (single state)
  402.  -s  name   specify output file for sequence
  403.  -nb count  number of images to be computed for sequence
  404.  
  405. Without command line parameters, the program starts in interactive mode
  406. and displays the editor window. Scenes may loaded from file or edited
  407. from scratch. All objects can be given material types. The regular table 
  408. of materials may be replaced by loading another table from file, or it may
  409. be edited (only possible if at least a single object is in the scene).
  410.  
  411.  
  412. EDITOR WINDOW & OBJECT WINDOW
  413. -----------------------------
  414. New objects may be selected from the menu "insert new object": sphere, 
  415. cylinder, cuboid (box), immovable point or plane. They appear in the center 
  416. of the coordinate system and may be translated using cursor keys in one 
  417. of the 2D views or the appropriate buttons in the object window. Objects may 
  418. be rotated using the buttons in the object window. For each object, material 
  419. and color may be set independently. The material determines an objects 
  420. density, which together with its volume determines its weight. 
  421. However, one may choose button "no gravitation" to inhibit the gravitational 
  422. force on an object.  Button "fixed" locks an object in its position (it cannot 
  423. be moved by gravitation or other forces, e.g. collision with moving objects).
  424.  
  425. Objects may be selected one after the other by pressing the "select next object"
  426. button in the main window. A selected object may be deleted by pressing the 
  427. appropriate button or liked to another object by selecting one of the link 
  428. types: rod, spring, damper or joint. The object to be linked with and some 
  429. parameter have to be specified. The link position is displayed with an "X". 
  430. Links may be removed by first selecting the link and then deleting the selected 
  431. link by pressing the appropriate buttons.
  432.  
  433. Forces may be exerted onto objects (button "add force"): directed force (always
  434. directed to the current position of another object), force with respect to 
  435. an object, and force with respect to the coordinate system. The target point 
  436. and the goal position (directed force) or the direction (other forces) have 
  437. to be specified together with the duration and strength of the force.
  438.  
  439. Quite a number of parameters for performing the rigid body simulation
  440. may be entered from the parameters menu (e.g. setting the gravity value,
  441. frames per second ratio, or the computation and simulation methods). 
  442.  
  443. The buttons "zoom in" and "zoom out" change the camera zoom. Button step
  444. computes a single successor image according to the rules selected. Note,
  445. this function cannot be un-done.
  446.  
  447.  
  448. ANIMATION WINDOW
  449. ----------------
  450. Button "Animation" opens the animation window with all objects in their
  451. current state. Note, not all image frames computed will also be stored!
  452. Only those image frames marked as "sync points" will be stored (use button
  453. "sync point" / "no sync point" for setting/unsetting). Similar to movie
  454. editing, cuts may be inserted into an animation sequence by means of the
  455. button "same scene" / "new scene".
  456.  
  457. The animation may be controlled via the buttons representing the functions
  458. of a video recorder. For returning to the editor window, press button "close".
  459.  
  460.  
  461. CALCULATION PARAMETERS
  462. ----------------------
  463.  
  464. integration step width
  465. error control
  466. accuracy between steps
  467. min. step width
  468. max. step width
  469.  
  470. The simulator integrates the acceleration and velocity to compute the
  471. positions of the objects. It uses a Runga-Kutta process to do this. If
  472. the error control ist not set, it is done with the constant
  473. time-step-rate of "integration step width". If the user choose "error control",
  474. the value in "accuracy between steps" is used to compute a step rate,
  475. which lies between min. and max. step width.
  476.  
  477.  
  478. collision detection
  479. collision step width
  480. max. resting speed
  481. min. penetration depth
  482. min. sliding speed
  483. min. rolling speed
  484. spring impact
  485.  
  486. If the collision detection is active, at least every "collision step
  487. width" a collision detection is invoked to determine if objects
  488. penetrate each other. The collision detection routine generates a list
  489. of collision points with the velocity and penetration depth. The
  490. collision velocities that are lower than the "max. rest speed" are
  491. handled as touching, all others as impact. The penetration depth should
  492. alway be greater than the "min. penetration depth". The "min. sliding
  493. speed" and "min. rolling speed" determine the type of friction which
  494. is applied: static or dynamic friction. Normally, an analytic solution
  495. to determine the velocities after an impact is used. The computation
  496. method by using springs and dampers (penality-methode) for the
  497. collision handling is used for the handling of the touching process
  498. and can also be applied to impacts when "spring impact" is activated. 
  499. Please note that the material constants of the material-table are used 
  500. in the analytical and penality methode.
  501.  
  502.  
  503. random gravitation
  504. random gravitation rate
  505.  
  506. By setting "random gravitation" a random value is added to the gravity 
  507. applied at every object.
  508.  
  509.  
  510. joint damping
  511. joint spring constant
  512. rod damping
  513. rod spring constant
  514. min. spring stretching
  515.  
  516. The upper values are necessary because of the approximation of a "rod" and 
  517. a "joint" by a spring and damper pair. 
  518.  
  519.  
  520. air resistance
  521. cw for sphere
  522. cw for cuboid
  523. cw for cylinder
  524.  
  525. A simplified air resistance can be activated, which uses the projected 
  526. body-plane and the cw-value to compute a force opposing the direction of
  527. movement. 
  528.  
  529.